﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Dynamic
{
    public interface IDynamicInterfaceProvider<E> : ICofeService
    {
        /// <summary>
        /// A set of Types that are usable as the generic parameter of CastAs() method.
        /// </summary>
        Type[] CastableInterfaces { get; }

        /// <summary>
        /// A set of Type that will be used to return the result of CastAs() method.
        /// This is used by DataContractSerializer.
        /// </summary>
        Type[] CastableContainers { get; }

        bool CanCastAs<T>(E input) where T : IDynamicInterface<E>;
        T CastAs<T>(E input) where T : IDynamicInterface<E>;
    }

    public interface IDynamicPropertyInterfaceProvider : IDynamicInterfaceProvider<Cofe.Core.Property.IPropertyHost>
    {        
    }
}
